package com.tejava.cafe_in;

import android.app.Activity;
import android.os.Bundle;
import android.view.KeyEvent;
import android.webkit.WebView;
import android.webkit.WebViewClient;


public class Tab04_Guide extends Activity {


private WebView mWebView;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		 setContentView(R.layout.activity_tab04__guide);
		
		setLayout();
		
		// À¥ºä¿¡¼­ ÀÚ¹Ù½ºÅ©¸³Æ®½ÇÇà°¡´É
		mWebView.getSettings().setJavaScriptEnabled(false); 
		// ±¸±ÛÈ¨ÆäÀÌÁö ÁöÁ¤
	    mWebView.loadUrl("http://webpds.cafe24.com/cafeIn/user/guide.php");
	    // WebViewClient ÁöÁ¤
	    mWebView.setWebViewClient(new WebViewClientClass());  
		
	}
	
	@Override 
    public boolean onKeyDown(int keyCode, KeyEvent event) { 
        if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) { 
            finish();
            return true; 
        } 
        finish();
        return super.onKeyDown(keyCode, event);
    }
    
    private class WebViewClientClass extends WebViewClient { 
        @Override 
        public boolean shouldOverrideUrlLoading(WebView view, String url) { 
            view.loadUrl(url); 
            return true; 
        } 
    }
	
	/*
	 * Layout
	 */
	private void setLayout(){
		mWebView = (WebView) findViewById(R.id.webViewGuide);
	}
}



